package com.acme.bankapp.domain.bank;

public class SavingsAccount extends AbstractAccount{
	
	public SavingsAccount(int initialValue){
		super(initialValue);
	}
	
	public void withdraw(int sum){
		if(this.getBalance() >= sum){
			this.setBalance(this.getBalance() - sum);
		}
		else{
			System.out.println("You cannot withdraw this sum");
		}
	}
	
	public int maximumAmountToWithdraw(){
		return this.getBalance();
	}
}
